import React from 'react'
import { Router, Route/*, hashHistory , Redirect */ } from 'react-router'

import {createHashHistory} from 'history';


// import Demo1 from '../page' 
import Index from '../pages/Index' 
import Login from '../pages/Login' 
import News from '../pages/News' 
import Games from '../pages/Games' 

const hashHistory = createHashHistory();

export default class RouteMap extends React.Component {  
    updateHandle () {  
        console.log('每次router变化之后都会触发')  
    }  
    render () {  
        return (  
            <Router history={hashHistory}  onUpdate={this.updateHandle.bind(this)}>  
                <Route path='/' component={Index}>
	                <Route path="/news" component={News} />
                    <Route path="/login" component={Login} />
                </Route>  
                <Route path="/games" component={Games} />
            </Router>  
        )  
    }  
}  